<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5">
  {
    style: {
      navigationBarTitleText: '商务合作',
      "enablePullDownRefresh": false,
    },
  }
  </route>
<template>
  <view>
    <view class="mt-5 mx-4">
      <view class="card" :data="item" v-for="(item, index) in businessList" :key="item.id"
        @click="to(`pages-sub/person/cooperation-detail?id=${item.id}`)">
        <view class="text-base text-[30rpx] line-clamp-1"> {{ item.title }}</view>
        <view class="line-clamp-1 text-[#999] text-xs mt-2">{{ item.synopsis }}</view>
      </view>
    </view>

  </view>
</template>

<script setup>
import { to } from "@/utils/navigation";
import { fetchBusinessList } from "@/service/cooperation";
import useReachBottomLoadMore from "@/hooks/useReachBottomLoadMore"

const { data: businessList, loading, refresh } = useReachBottomLoadMore(fetchBusinessList);

onShow(() => {
  refresh()
});


</script>

<style lang="scss" scoped>
.card {
  @apply bg-white;
  padding: 30rpx 20rpx;
  margin-bottom: 20rpx;
  box-shadow: 0rpx 3rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
}
</style>
